<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="../_template.xhtml">


	<ui:define name="conteudo">
		<h:form id="porte">
			<p:messages autoUpdate="true" />
			<p:growl autoUpdate="true" />

			<p:fieldset legend="Cadastro de Raça">

				<p:panelGrid columns="2">

					<h:outputLabel value="Raça: " for="descricao" />
					<p:inputText id="descricao" value="#{racaBean.raca.raca}"
						required="true" requiredMessage="Raça Obrigatória" title="Digite aqui uma nova raça!" >
						<f:validateLength minimum="1" maximun="20" />
					</p:inputText>
					
					<h:outputLabel value="Porte da raça: " for="porteID" />
					<p:selectOneMenu name="selecaoPorte" id="porteID"
						value="#{racaBean.porteID}" title="Escolha o porte da raça!">
						<f:selectItems value="#{porteBean.portes}"
							var="porte" itemLabel="#{porte.porte}"
							itemValue="#{porte.id}" />
					</p:selectOneMenu>
				
				<p:commandButton value="Gravar" action="#{racaBean.gravar}" ajax="false"/>
				</p:panelGrid>
			</p:fieldset>
		</h:form>
	</ui:define>

</ui:composition>


</html>